package cn.skcks.springboot06security.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Controller
public class RouteController {
	@RequestMapping(value = {"/","/index"})
	public String index(){
		return "index";
	}

	@RequestMapping(value = "/toLogin")
	public String toLogin(){
		return "login";
	}

	@RequestMapping("/level/{level}")
	public String toLevel(@PathVariable("level") int level){
		return "views/level"+level+"/" +
				"index" ;
	}
}